x86/hvm: wait for at least one ioreq server to be enabled
authorPaul Durrant <paul.durrant@citrix.com>
Tue, 10 Feb 2015 12:28:40 +0000 (13:28 +0100)
committerJan Beulich <jbeulich@suse.com>
Tue, 10 Feb 2015 12:28:40 +0000 (13:28 +0100)
commitdd748d128d86996592afafea02e578cc7d4e6d42
tree78beb6936272c85601f96994161e23d23cab86dc
parent8bc64413be51c91b8f5e790b71e0d94727f9f004
x86/hvm: wait for at least one ioreq server to be enabled

In the case where a stub domain is providing emulation for an HVM
guest, there is no interlock in the toolstack to make sure that
the stub domain is up and running before the guest is unpaused.

Prior to the introduction of ioreq servers this was not a problem,
since there was only ever one emulator so ioreqs were simply
created anyway and the vcpu remained blocked until the stub domain
started and picked up the ioreq.

Since ioreq servers allow for multiple emulators for a single guest
it's not possible to know a priori which emulator will handle a
particular ioreq, so emulators must attach to a guest before the
guest runs.

This patch works around the lack of interlock in the toolstack for
stub domains by keeping the domain paused until at least one ioreq
server is created and enabled, which in practice means the stub
domain is indeed up and running.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
xen/arch/x86/hvm/hvm.c
xen/include/asm-x86/hvm/domain.h